<html>
<head><meta charset="utf-8"><title>rustc logging story · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html">rustc logging story</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192424208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> David Barsky <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424208">(Mar 31 2020 at 17:42)</a>:</h4>
<p>(so the logging story in rustc isn't... great?)</p>



<a name="192424280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424280">(Mar 31 2020 at 17:43)</a>:</h4>
<p>it's debug logging for local builds</p>



<a name="192424306"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424306" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424306">(Mar 31 2020 at 17:43)</a>:</h4>
<p>as in, while working on rustc</p>



<a name="192424464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424464">(Mar 31 2020 at 17:44)</a>:</h4>
<p>the tracing backend isnt json specific right</p>



<a name="192424471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424471">(Mar 31 2020 at 17:44)</a>:</h4>
<p>its tracing-serde?</p>



<a name="192424521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424521">(Mar 31 2020 at 17:45)</a>:</h4>
<p>also is that a layer or an old style subscriber</p>



<a name="192424617"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424617" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424617">(Mar 31 2020 at 17:46)</a>:</h4>
<p>i dont even see a subscriber in tracing-serde</p>



<a name="192424698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424698">(Mar 31 2020 at 17:46)</a>:</h4>
<p>well, re the GBs of json, I was wondering if maybe we could use some other serialization format that would be faster/denser on the disk</p>



<a name="192424755"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424755" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424755">(Mar 31 2020 at 17:46)</a>:</h4>
<p>the solution is to not enable everything :P</p>



<a name="192424775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424775">(Mar 31 2020 at 17:47)</a>:</h4>
<p>plus there's some silly logging that prints every byte in rmeta or w/e</p>



<a name="192424791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192424791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192424791">(Mar 31 2020 at 17:47)</a>:</h4>
<p>that we could get rid of</p>



<a name="192425043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425043">(Mar 31 2020 at 17:48)</a>:</h4>
<p>thats fair</p>



<a name="192425106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425106">(Mar 31 2020 at 17:49)</a>:</h4>
<p>but I feel like the more logging you can get away with without making your program slow / your logs impenetrable, the better</p>



<a name="192425181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425181">(Mar 31 2020 at 17:49)</a>:</h4>
<p>fuck now I wanna do a tracing-serde layer and a log viewer / query cli</p>



<a name="192425197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425197">(Mar 31 2020 at 17:49)</a>:</h4>
<p>sure, but you hit limitations of scale :P</p>



<a name="192425204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425204">(Mar 31 2020 at 17:49)</a>:</h4>
<p>but I have no idea how to design an ergonomic api for querying logs</p>



<a name="192425267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425267">(Mar 31 2020 at 17:50)</a>:</h4>
<p>a compiler has to do so much</p>



<a name="192425303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425303">(Mar 31 2020 at 17:50)</a>:</h4>
<p>for sure, and that 1% perf matters</p>



<a name="192425339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425339">(Mar 31 2020 at 17:50)</a>:</h4>
<p>not even, the reason nightly doesn't include logging is code size IIRC</p>



<a name="192425349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425349">(Mar 31 2020 at 17:50)</a>:</h4>
<p>code size of the compiler?</p>



<a name="192425352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425352">(Mar 31 2020 at 17:50)</a>:</h4>
<p>like</p>



<a name="192425356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425356">(Mar 31 2020 at 17:50)</a>:</h4>
<p>although I guess checking an atomic in a bunch of places might be costly</p>



<a name="192425360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425360">(Mar 31 2020 at 17:50)</a>:</h4>
<p>too physically big of a binary?</p>



<a name="192425395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425395">(Mar 31 2020 at 17:51)</a>:</h4>
<p>yeah, we can't have even line-only debuginfo, for that reason</p>



<a name="192425414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425414">(Mar 31 2020 at 17:51)</a>:</h4>
<p>it's like 100MB extra. idk how much debug logging is</p>



<a name="192425419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425419">(Mar 31 2020 at 17:51)</a>:</h4>
<p>line-only debuginfo?</p>



<a name="192425437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425437">(Mar 31 2020 at 17:51)</a>:</h4>
<p>yeah to be able to get backtraces</p>



<a name="192425440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425440">(Mar 31 2020 at 17:51)</a>:</h4>
<p>ooh</p>



<a name="192425532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425532">(Mar 31 2020 at 17:52)</a>:</h4>
<p>oh eddy speaking of backtraces</p>



<a name="192425538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425538">(Mar 31 2020 at 17:52)</a>:</h4>
<p>but when I said scale earlier I meant <code>RUSTC_LOG=debug</code>, for a local build where that does anything, produces far too much output</p>



<a name="192425543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425543">(Mar 31 2020 at 17:52)</a>:</h4>
<p>because <em>so much</em> happens</p>



<a name="192425547"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425547" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425547">(Mar 31 2020 at 17:52)</a>:</h4>
<p>do you wanna see a pre rfc im working on? <span aria-label="eyes" class="emoji emoji-1f440" role="img" title="eyes">:eyes:</span></p>



<a name="192425689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425689">(Mar 31 2020 at 17:53)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> <code>debug-assertions = true</code></p>



<a name="192425704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192425704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192425704">(Mar 31 2020 at 17:53)</a>:</h4>
<p>and the env var is <code>RUSTC_LOG</code> not <code>RUST_LOG</code></p>



<a name="192640640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192640640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192640640">(Apr 02 2020 at 09:32)</a>:</h4>
<p><span class="user-mention" data-user-id="220273">@Jane Lusby</span> <span class="user-mention" data-user-id="232957">@Jack Huey</span> oops looks like when I stop being able to edit my own messages' content I stop being able to edit other people's topics. if you want feel free to move messages between the two topics I've split this one into (but don't forget to set it "<em>only</em> this message", by default it moves all the following conversation)</p>



<a name="192640909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/rustc%20logging%20story/near/192640909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/rustc.20logging.20story.html#192640909">(Apr 02 2020 at 09:35)</a>:</h4>
<p>actually it's 60min for my own message content and 24h for other people's topics?</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>